import httpRequest from '@/utils/httpRequest'

export function getOne () {
  return httpRequest({
    url: '/dg-standard-info/dgstandardregion/list',
    method: 'post',
    params: {regionId: 0, type: 11}
  })
}

export function getTwo (countryId) {
  return httpRequest({
    url: `/dg-standard-info/dgstandardregion/list`,
    method: 'post',
    params: {regionId: countryId, type: 12}
  })
}

export function getThree (provinceId) {
  return httpRequest({
    url: `/dg-standard-info/dgstandardregion/list`,
    method: 'post',
    params: {regionId: provinceId, type: 13}
  })
}

export function getFour (cityId) {
  return httpRequest({
    url: `/dg-standard-info/dgstandardregion/list`,
    method: 'post',
    params: {regionId: cityId, type: 23}
  })
}

export function getFive (areaId) {
  return httpRequest({
    url: `/dg-standard-info/dgstandardregion/list`,
    method: 'post',
    params: {regionId: areaId, type: 32}
  })
}

export function getSix (communityCodeId) {
  return httpRequest({
    url: `/dg-standard-info/dgstandardregion/list`,
    method: 'post',
    params: {regionId: communityCodeId, type: 42}
  })
}

// 获取所有小区 现在读取自己的以后读一标三实
export function getAllArea () {
  return httpRequest({
    url: `/dg-ic/ic/housing-estate/getByCommuntId/all`,
    method: 'get'
  })
}
// 获取小区根据小区id
export function getAreaByAreaId (id) {
  return httpRequest({
    url: `/dg-ic/ic/info/` + id,
    method: 'get'
  })
}
// 获取小区获取楼栋
export function getBuildingByAreaId (id) {
  return httpRequest({
    url: `/dg-ic/ic/building/getByHousing/` + id,
    method: 'get'
  })
}
// 获取楼栋id获取房间
export function getRoomByBuildingId (id) {
  return httpRequest({
    url: `/dg-ic/ic/room/getByBuilding/` + id,
    method: 'get'
  })
}
// 获取房间获取人
export function getPersonsByRoomId (id) {
  return httpRequest({
    url: `/dg-ic/ic/personnel-basic/getByRoomId/` + id,
    method: 'get'
  })
}

export function getDgregisterpopulationList (query) {
  return httpRequest({
    url: '/dg-standard-info/dgactualpopulation/list',
    method: 'post',
    params: query
  })
}
